
const request = require('request')
const fs = require('fs')


exports.downloadImg = function (url, imgName, callback) {
    let dstPaht = "/Users/liuyongliang/Pictures/pap.er/" + imgName + ".jpg"
    request(url).pipe(fs.createWriteStream(dstPaht)).on("close", () => {
        callback(dstPaht)
    })
}
